package lcy.homework02;

import java.util.Random;

/**
 * @ClassName: Point
 * @Description:
 * @author: 李春洋
 * @date: 2024/3/30 17:23
 * @Blog: https://
 */
public class Point {
    double x;
    double y;

    Point(double x, double y) {
        this.x = x;
        this.y = y;
    }

    //获取随机步数
    static Point getRandomStep() {
        Random rand = new Random();
        double stepX = rand.nextDouble();
        double stepY = rand.nextDouble();
        return new Point(stepX, stepY);
    }
}
